#include "common.h"
#include "Item.h"
#include "Creature.h"
#include <allegro.h>

void Item::draw(BITMAP *surface, short x, short y)
{
    BITMAP *p;
    if (m_where == WHERE_GROUND)
        p = m_tile_inv;
    else if (m_where == WHERE_INVENTORY)
        p = m_tile_inv;
    else
        p = m_tile_body;

    draw_sprite(surface, p, x, y);
/*
     if (m_where == WHERE_GROUND)
        INST(SeenObj).add(this, Rect(x, y, p->w, p->h), m_mapx, m_mapy);
*/
}

bool Item::canEquip() const
{
    return (int)m_type < BODY_MAX;
}

Item::Type Item::use(Player *player)
{
    return USE_REMOVE;
}
